package org.csu.myPetStore.service;

import org.csu.myPetStore.domain.Product;
import org.csu.myPetStore.persistence.ProductDAO;
import org.csu.myPetStore.persistence.impl.ProductDAOImpl;

import java.util.ArrayList;
import java.util.List;

public class SearchService {
    private ProductDAO productDAO;

    public SearchService(){
        productDAO = new ProductDAOImpl();
    }

    public List<String> searchProductList(String keyword){
        System.out.println("EnterS");
        return  productDAO.searchProductStringList("%" + keyword.toLowerCase() + "%");
    }
}
